function startCourse()

{

    
    // check to see if cookies is enabled, otherwise, this won't work
	
	if( typeof sessionStorage == "undefined" || sessionStorage.disabled )
	
	{
	
	alert( "You must enable cookies for this course to work properly." );

	}

	else

	{

// if it is enabled, checked to see if this course was started

// if it was not able to retrieve, the key "course_started", then

// then this is the first time we are running the course


        if( !sessionStorage.getItem( "course_started" ) )

        {

        // clear the session storage

        sessionStorage.clear();

        // set the "key" by giving it a value.  all values are strings!

    sessionStorage.setItem( "course_started", "1" );
    sessionStorage.setItem( "colombia", "0" );
    sessionStorage.setItem( "laos", "0" );
    sessionStorage.setItem( "sweden", "0" );
    sessionStorage.setItem( "uae", "0" );
			}


 	}
}
	
function visitcolombia()

{

sessionStorage.setItem( "colombia", "visited" );

showQuiz();

}

function visitlaos()

{

sessionStorage.setItem( "laos", "visited" );

showQuiz();

}

function visitsweden()

{

sessionStorage.setItem( "sweden", "visited" );

showQuiz();

}

function visituae()

{

sessionStorage.setItem( "uae", "visited" );

showQuiz();

}


//this function will check to see if every page was visited

//if so, show the quiz link

function showQuiz()
{
var colombiaVisited = sessionStorage.getItem( "colombia" );

var laosVisited = sessionStorage.getItem( "laos" );

var swedenVisited = sessionStorage.getItem( "sweden" );

var uaeVisited = sessionStorage.getItem( "uae" );

//alert( colombiaVisited + " " + laosVisited + " " + swedenVisited + " " + uaeVisited );
if( colombiaVisited == "visited" && laosVisited == "visited" && swedenVisited == "visited" && uaeVisited == "visited" )

{

document.getElementById( "quiz-link" ).style.display = "inline";
}

}
